﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Services;
using CongThongTin.Entities;

namespace CongThongTin.Administrators
{
    public partial class QuanLyVanBan : System.Web.UI.Page
    {
       

        protected void Page_Load(object sender, EventArgs e)
        {

        }

        [WebMethod]
        public static string themMoiTL(string ten)
        {
            CongThongTinEntities _entities = new CongThongTinEntities();
            string result ="Thêm thành công";
            try
            {
                THELOAIVANBAN oTL = new THELOAIVANBAN();
                oTL.TENTHELOAI = ten.Trim();

                _entities.THELOAIVANBANs.AddObject(oTL);
                _entities.SaveChanges();
            }
            catch (Exception ex)
            {
                result = "Lỗi xin xem lại dữ liệu nhập.";
            }
            return result;
        }
    }
}